package com.spark3

import org.apache.spark.sql.SparkSession

object MainTest02 {

  def main(args: Array[String]): Unit = {

      println("初始化spark~~~")

      val spark = SparkSession
        .builder()
        .config("spark.custom.cost","twh")
        .enableHiveSupport()
        .getOrCreate()

      spark.sql("show databases").show(false)
//      spark.sql("use spark_authority_test").show(false)
//      spark.sql("drop table twh_test").show(false)
//      spark.sql("create table twh_test(id int,name string)").show(false)
//      spark.sql("insert overwrite table twh_test select * from twh_k").show(false)
//      spark.sql("select * from twh_test").show(false)

      spark.stop()
  }
}
